<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>二维码展示例子</title>
		<style>
			body{
				background-color: rgb(204, 212, 230);
				display: flex;
				justify-content: center;
			}
			.a{
				position: relative;
				width: 700px;
				height: 400px;
				border: #fff 10px solid;
				background-color: rgb(120, 140, 200);
				top: 120px;
				border-radius: 20px;
				overflow: hidden;
			}
			.b{
				position: absolute;
				width: 200px;
				height: 300px;
				left: 0;
				margin: 75px 50px;
				transition: 1s;
			}
			.b a{
			text-decoration: none;
				color: #fff;
				font: 900 28px '';
			}
			.b h2{
				transition: .5s 1s;
				opacity: 0;
				color: rgb(30, 210, 200) ;
			}
			.b span{
				transition: .5s 1s;
				color: #fff;
				font: 500 15px '';
				position: absolute;
				top: 70px;
			}
			.c{
				position: absolute;
				top: -130px;
				right: -240px;
			}
			.d,.e{
				position: absolute;
				right: calc(var(--i)*100px);
				width: calc(var(--w)*40px);
				height: 500px;
				overflow: hidden;
				border-radius: 100px;
				transform: rotateZ(220deg) translate(0,0);
				background: rgb(240,220,150);
				transition: .5s .5s;
			}
			.d:nth-child(2){
				background: rgb(240,190,230) ;
			}
			.e{
				left: -470px;
				top: -140px;
				width: 70px;
				background: rgb(90, 220, 150);
			}
			
			.a:hover .c div{
				/* 设置延迟动画 */
				transition: .5s calc(var(--i)*.1s);
				/* 移动轨迹 */
				transform: rotateZ(220deg) translate(-200px,400px);
			}
			.a:hover .b{
				transition: 1s .5s;
				left: 370px;
			}
			.a:hover .b h2{
				transition: 1s .5s;
				opacity: 1;
			}
			.a:hover .b span{
				transition: 1s .5s;
				top: 105px;
			}
			.f{
				width: 250px;
				height: 250px;
				position: absolute;
				background-image: url(./images/杰哥.jpg);
				background-size: cover;
				margin: 70px;
				opacity: 0;
				transition: 1s .5s;
				
			}
			.a:hover .f{
				transition: 1s 1.3s;
				opacity: 1;
			}

			.a .f img {
				width: 100%;
				height: 100%;
			}
		</style>
	</head>
	<body>
		<!-- 名片分为3大块
		 最外层的一块a
		 文字的一块是b
		 平面圆柱是c
		 -->
		 <div class="a">
			 <div class="b">
				<a href="#">二维码扫码</a> 
				 <h2>WX:Sod-of-goat</h2>
				 <span>I'm a front-end developer enthusiast,<br>I'm learing new knowledge every day to share with you,<br> Ihope in the days to come <br>Keep going!!</span>
			 </div>
			 
			 <div class="c">
				 <!-- i是用来计算平面圆柱的动画延迟特效和距离
					  w则是用来计算圆柱的宽度	
				  -->
				 <div class="d" style="--i:1;--w:1.5"></div>
				 <div class="d" style="--i:2;--w:1.6"></div>
				 <div class="d" style="--i:3;--w:1.4"></div>
				 <div class="d" style="--i:4;--w:1.7"></div>
				 <div class="e" style="--i:1;"></div>
			 </div>
			 <!-- 设置二维码 -->
			 <div class="f">
				<img src="./images/杰哥.jpg" alt="">
			 </div>
		 </div>
	</body>
</html>
